package com.base.cn.platform.os.controller.manage.join;

import com.base.cn.platform.os.common.controller.BaseController;
import com.base.cn.platform.os.entity.manage.role.SysRole;
import com.base.cn.platform.os.service.manage.join.SysUserRoleBiz;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.math.BigDecimal;
import java.util.List;

/**
 * 用户与角色关联的Controller
 *
 * @author s.li
 * @create 2018-03-06 15:14
 */
@RestController
@RequestMapping("/manage")
public class SysUserRoleController extends BaseController {

    @Autowired
    private SysUserRoleBiz sysUserRoleBiz;

    /**
     * 通过用户ID，查询用户的角色列表
     * @param userId 用户ID
     * @return 角色列表
     */
    @RequestMapping("/findUserRoleListByUserId")
    public List<SysRole> findUserRoleListByUserId(BigDecimal userId){
        return sysUserRoleBiz.findSysUserRoleListByUserId(userId);
    }


}
